<template>
  <div class="w">
        <span class="yes" @click="ggg()">
            <slot></slot>
        </span>
  </div>
</template>

<script>
import axios from 'axios';
export default {
    name:'Xbtn',
    data(){
        return{

        }
    },methods:{
        ggg(){
            console.log(this.$store.state.wadd1);
            var list=this.$store.state.wadd1[1].input;
            var a1=this.$store.state.wadd1[1].input[0].oblast,
            a2=this.$store.state.wadd1[1].input[1].city,
            a3=this.$store.state.wadd1[1].input[2].country,
            a4=this.$store.state.wadd1[2].input[0].detail;
            var str=a1+" "+a2+" "+a3+" "+a4;
            var obj={
                id:this.$store.state.obj[0].addressId,
                realName:this.$store.state.wadd1[0].input[0].names,
                phone:this.$store.state.wadd1[3].input[0].phone,
                address:str,
                zipCode:'101010',
            }
            axios({
                method:'post',
                url:'/api/small/user/verify/v1/changeReceiveAddress',
                params:obj,
                headers:{
                    userId:this.$store.state.obj[0].userId,
                    sessionId:this.$store.state.obj[0].sessionId
                }
            }).then(res=>{
                console.log(res.data);
            });

        },
    }

}
</script>

<style scoped>
.yes{
    color: #ffffff;
    display: inline-block;
    cursor: pointer;
}
.w{
   display: inline-block;
}
</style>